<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            	<span class="icon-bar"></span>
            	<span class="icon-bar"></span>
            	<span class="icon-bar"></span>
          	</button>
          	<a class="brand" href="${pageContext.request.contextPath}/">搜吃搜玩</a>
          	
          	<div class="nav-collapse collapse">
            	<ul class="nav">
           		<c:forEach var="menu" items="${menuList}">
              		<li ><a href="${pageContext.request.contextPath}/${menu.menuUrl }">${menu.menuName } ${request.getContextPath }</a></li>
            	</c:forEach>
            	</ul>
            
            
            	 <c:choose>

				   <c:when test="${user!=null}">
				   	    <ul class="nav pull-right">
		              		<li class="dropdown">
		                		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="${user.avatarUrl }" width="20" height="20"> ${user.nickName } <b class="caret"></b></a>
				               
				                <ul class="dropdown-menu">
				                  <li><a href="${pageContext.request.contextPath}/user/profile">个人中心</a></li>
				                  <li><a href="${pageContext.request.contextPath}/user/point">积分明细</a></li>
				                  <li><a href="${pageContext.request.contextPath}/user/withdraw">申请提现</a></li>
				                  <li class="divider"></li>
				                  <li><a href="#">退出</a></li>
				                </ul>
				                
		              		</li>
		            	</ul>
				   </c:when>
				   
				   <c:otherwise>  
					   	<p class="navbar-text pull-right">
			              <a href="${pageContext.request.contextPath}/user/qq/login" class="navbar-link">
			              	<img src="${pageContext.request.contextPath}/img/qqlogo.png" width="76" height="24" alt="">
			              </a>
			            </p>
				   </c:otherwise>
				</c:choose>
			</div>
		</div>
	</div>
</div>

    <!-- Modal -->
    <div id="LoginModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">登录</h3>
      </div>
      <div class="modal-body">
        <form class="form-signin">
          <input type="text" class="input-block-level" placeholder="Email address">
          <input type="password" class="input-block-level" placeholder="Password">
          <label class="checkbox">
            <input type="checkbox" value="remember-me">记住我
          </label>
          <button class="btn btn-primary" type="submit">登录</button>
        </form>
      </div>
      <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button class="btn btn-primary">确定</button>
      </div>
    </div>